#include<stdio.h>
#include<mysql/mysql.h>
#include<string.h>

#define _HOST_ "localhost"
#define _USER_ "root"
#define _PWD_ "zhang123"
#define _DB_ "talktip_db"

int main(void ){
	MYSQL * mysql = NULL;
	// 
	mysql = mysql_init(NULL);
	if(NULL==mysql){
		printf("mysql_init failed...\n");
		return 1;
	}
	printf("mysql_init successed\n");
	mysql = mysql_real_connect(mysql,_HOST_,_USER_,_PWD_,_DB_,0,NULL,0);
	if(NULL==mysql){
		printf("mysql_real_connect failed ... \n");
		return 1;
	}
	printf("mysql_real_connect successed\n");
	mysql_close(mysql);
	return 0;
}

